# $Id: PKGBUILD 184378 2013-05-06 19:37:15Z foutrelis $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=fvwm
pkgver=2.6.5
pkgrel=2
pkgdesc="A multiple large virtual desktop window manager originally derived from twm"
arch=('i686' 'x86_64')
url="http://www.fvwm.org"
license=('GPL' 'custom')
depends=('imlib' 'fribidi' 'perl' 'libstroke' 'libxpm' 'librsvg' 'libxinerama' 'libxcursor')
makedepends=('libxslt')
options=('!emptydirs' '!makeflags')
source=(ftp://ftp.fvwm.org/pub/fvwm/version-${pkgver%%.*}/${pkgname}-${pkgver}.tar.bz2 fvwm.desktop)
sha1sums=('c4cf96df65817d501b41c6fd79cf22658dd516a8'
          '6fd8fd767f32f88cc8b4743a2ba49bcfcdb32bcb')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke-library
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -D -m644 sample.fvwmrc/{decor_examples,DecorMwm,DecorWin95,new-features,system.*} "${pkgdir}/usr/share/doc/fvwm"
  install -D -m644 ../fvwm.desktop "${pkgdir}/usr/share/xsessions/fvwm.desktop"
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
